class Solution:
    def intToRoman(self, num: int) -> str:
        value = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1]
        res = ["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]
        string = ""
        for i in range(13):
            while num>=value[i]:
                num-=value[i]
                string+=res[i]
        return string
        